Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Documents relations between mapped DTO resources, which
core/dto.mddoes not cover today: every example there maps scalars only.A relation typed on another DTO Resource is the case where the object mapper needs help. It builds objects and has no identity map, so the related DTO reaches the entity's property as-is and
PropertyAccessfails:Declaring the reverse mapping does not fix it either — it moves the failure to the flush, with
A new entity was found through the relationship, and cascading inserts a duplicate row instead.The new section sits at the end of "1. The DTO Resource (State Options)", right before the Input/Output DTO chapter, and covers:
ManagedEntityTransformon a to-one and on a to-many;stateOptions, the identifier from its metadata — never assumed to beid);Documents the feature added in api-platform/core#8547 — to be merged once that one is.